<?php
	
	

	$id= $_GET['idbpos'];
	$cCategory = new CCategory;
	
	
	$category = $cCategory ->CCategoryDetail($id);
	
	
	
	$notification = "";
	
	if(is_array($category))
	{
	
		if(isset($_GET['notification']))
		{
			$notification =constant($_GET['notification']);
		}
	
		
		if($category['status'] ==1)
		{
			$rdbtnStatus ='  <label><input type="radio" name="rdbtn_status" value="1" checked="checked" >Active</label>
							<br>
							<label><input type="radio" name="rdbtn_status" value="0" > Inactive </label>
							';
		}
		else
		{
			$rdbtnStatus =' <label><input type="radio" name="rdbtn_status" value="1"  >Active </label>
						<br>
						<label><input type="radio" name="rdbtn_status" value="0" checked="checked">Inactive </label>
						';
		}
	
		
	
		$mainContent = '<form action="processCategory.php" method="post" name="form1">
					<script type="text/javascript">
						bkLib.onDomLoaded(function() {
						new nicEditor({maxHeight : 200}).panelInstance("area");
						});
					</script>
					<div id="content2">
						<span style="font-size:10px;color:#FF0000;font-weight:bold;font-family:Arial, Helvetica, sans-serif">'.$notification.'</span>
						<input type="hidden" name="showCategory" value="'.$id.'">
						<table border="0" width="90%" style="position:relative" align = "center" >
						<tr>
							<td colspan="2" align="left" valign="middle" height="50px"> 
							 <img src="images/profile.png" style="float:left" border="0"/>
							<span class="mystyle1"> Edit Category </span>		 </td>
						</tr>
						<tr>
							<td><span class="mystyle2">Name <span>
							</td>
							<td>
								<input id="input1" type="text" name="tf_name" value="'.$category['name'].'" >
							</td>
						</tr>
						
						<tr>
							<td valign="top"><span class="mystyle2">Description <span>
							</td>
							<td>                                    	
								<textarea cols="55" name="tf_description" id="area" style="height: 100px;">'.$category['description'].'</textarea>
							</td>
						</tr>
						
						<tr>
							<td>
								Status:
							</td>
							<td>
								'.$rdbtnStatus.'
							</td>
						</tr>
						<tr align="center">
							<td colspan="2" height="50px">
								<input id="input2"  type="submit" name="btn_ok" value="  OK  ">
								<input id="input2" name="btn_cancel" type="submit" value="  Cancel  " >
							</td>
						</tr>
 
						</table>
					</div>
					<input type="hidden" name="hCategoryAction" value="edi">					
					</form>';
	}
	else
	{
		$mainContent ="Please view in list Category again to delete. Updating data....";
	}


?>